/* ----------------------------------------------------------------------
 *	Shadow Quest
 *	Copyright (C) 2009 Prageeth Silva <prageeth@thenewcoders.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *  ----------------------------------------------------------------------
 */

package menu.tabobject;

import org.newdawn.slick.Color;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;

/** Object to be placed in a MenuTab
 * 
 */
public abstract class MenuTabObject
{

	public enum Alignment 
	{ 
		LEFT, RIGHT, CENTER
	}
	
	private float x, y;
	private Alignment align;
	private Color color;
	
	public MenuTabObject(float x, float y, Alignment align, Color color)
	{

		this.setX(x);
		this.setY(y);
		this.setAlignment(align);
		this.setColor(color);
		
	}
	
	public float getX()
	{
		return this.x;
	}
	
	public void setX(float x)
	{
		this.x = x;
	}
	
	public float getY()
	{
		return this.y;
	}
	
	public void setY(float y)
	{
		this.y = y;
	}
	
	public Alignment getAlignment()
	{
		return this.align;
	}
	
	public void setAlignment(Alignment align)
	{
		this.align = align;
	}
	
	public Color getColor()
	{
		return this.color;
	}

	public void setColor(Color color)
	{
		this.color = color;
	}
	
	
	/** Update the game state for a frame.
     * @param input The input object
     * @param delta Time passed since last frame (milliseconds).
     */
    public abstract void update(Input input, int delta)
    throws SlickException;
    
    /** Render the entire screen, so it reflects the current game state.
     * @param g The Slick graphics object, used for drawing.
     */
    public abstract void render(Graphics g) 
    throws SlickException;
    
    public abstract void resetValue();
    
    public abstract void saveValue();

}
